<template>
  <section class='dc-edit' v-focus>
    <XdoCard class='xdo-card' :bordered='false'>
      <div class='xdo-card-body'>
        <XdoForm ref='formItem' :model='formItem' label-position='right' :label-width='120' :rules='ruleValidate' inline>
          <div class='dc-form'>
            <XdoFormItem prop='emsNo' label='账册编号' xid='c_head_edit_form_item'>
              <XdoIInput type='text' v-model='formItem.emsNo' :disabled='showDisable' xid='d_emsNo'></XdoIInput>
            </XdoFormItem>
            <XdoFormItem prop='emsListNo' label='企业内部编号' xid='c_head_edit_form_item'>
              <XdoIInput type='text' v-model='formItem.emsListNo' :disabled='showDisable' xid='d_emsListNo'></XdoIInput>
            </XdoFormItem>
            <XdoFormItem prop='listNo' label='核注清单编号' xid='c_head_edit_form_item'>
              <XdoIInput type='text' v-model='formItem.listNo' disabled xid='d_listNo'></XdoIInput>
            </XdoFormItem>
            <XdoFormItem prop='agentCode' label='报关申报企业编码' xid='c_head_edit_form_item'>
              <xdoIInput v-model='formItem.agentCode' v-on:keyup.enter.native='getAgentNameAndCode' filterable transfer
                         clearable :disabled='agentCodeShow' :options='this.agentCodeList'
                         xid='d_agentCode'></xdoIInput>
            </XdoFormItem>
            <XdoFormItem prop='agentCreditCode' label='报关申报企业社会信用代码' xid='c_head_edit_form_item'>
              <XdoIInput type='text' v-model='formItem.agentCreditCode' :disabled='showDisable'
                         xid='d_agentCreditCode'></XdoIInput>
            </XdoFormItem>
            <XdoFormItem prop='agentName' label='报关申报企业名称' xid='c_head_edit_form_item'>
              <XdoIInput type='text' v-model='formItem.agentName' :disabled='showDisable' xid='d_agentName'></XdoIInput>
            </XdoFormItem>
            <XdoFormItem prop='dclcusMark' label='报关标志' xid='c_head_edit_form_item'>
              <xdo-select v-model='formItem.dclcusMark' @on-change='dclcusMarkChange' filterable transfer clearable
                          :disabled='showDisable' :options='this.dclcusMarkList' dataValue='code' dataLabel='name'
                          xid='d_dclcusMark'></xdo-select>
            </XdoFormItem>
            <XdoFormItem prop='dclcusType' label='报关类型' xid='c_head_edit_form_item'>
              <xdo-select v-model='formItem.dclcusType' @on-change="dclcusTypeChange" filterable transfer clearable :disabled='agentCodeShow'
                          :options='this.dclcusTypeList' dataValue='code' dataLabel='name'
                          xid='d_dclcusType'></xdo-select>
            </XdoFormItem>
            <XdoFormItem prop='declareCode' label='申报单位编码' xid='c_head_edit_form_item'>
              <XdoIInput type='text' v-model='formItem.declareCode' :disabled='showDisable'
                         xid='d_declareCode'></XdoIInput>
            </XdoFormItem>
            <XdoFormItem prop='declareDate' label='清单申报日期' xid='c_head_edit_form_item'>
              <XdoDatePicker type='date' format='yyyy-MM-dd' placeholder=''
                             :value='formItem.declareDate ? formItem.declareDate.slice(0, 10) : formItem.declareDate'
                             @on-change="formItem.declareDate=($event === '' ? $event : ($event + ' 23:59:59'))"
                             transfer :disabled='showDisable' xid='d_declareDate'></XdoDatePicker>
            </XdoFormItem>
            <XdoFormItem prop='entryNo' label='报关单编号' xid='c_head_edit_form_item'>
              <XdoIInput type='text' v-model='formItem.entryNo' :disabled='entryNoShow' xid='d_entryNo'></XdoIInput>
            </XdoFormItem>
            <XdoFormItem prop='entryType' label='报关单类型' xid='c_head_edit_form_item'>
              <xdo-select v-model='formItem.entryType' @on-change='judgeEntryNo' filterable transfer clearable
                          :disabled='agentCodeShow' :options='this.entryTypeList' dataValue='code' dataLabel='name'
                          xid='d_entryType'></xdo-select>
            </XdoFormItem>
            <XdoFormItem prop='gMark' label='料件成品标志' xid='c_head_edit_form_item'>
              <xdo-select v-model='formItem.gMark' filterable transfer clearable :disabled='gMarkShowDisable'
                          :options='this.gMarkList' dataValue='code' dataLabel='name' xid='d_gMark'></xdo-select>
            </XdoFormItem>
            <XdoFormItem prop='iEPort' label='进境关别/出境关别' xid='c_head_edit_form_item'>
              <xdo-select v-model='formItem.iEPort' @on-change='judgeStatus' filterable transfer clearable
                          :disabled='showDisable' :options='this.iEPortList' :asyncOptions='pcodeList'
                          :meta='pcode.customs_rel' :optionLabelRender='pcodeRender' xid='d_iEPort'></xdo-select>
            </XdoFormItem>
            <XdoFormItem prop='inputDate' label='录入日期' xid='c_head_edit_form_item'>
              <XdoDatePicker type='date' format='yyyy-MM-dd' placeholder=''
                             :value='formItem.inputDate ? formItem.inputDate.slice(0, 10) : formItem.inputDate'
                             @on-change="formItem.inputDate=($event === '' ? $event : ($event + ' 23:59:59'))" transfer
                             :disabled='showDisable' xid='d_inputDate'></XdoDatePicker>
            </XdoFormItem>
            <XdoFormItem prop='listType' label='清单类型' xid='c_head_edit_form_item'>
              <xdo-select v-model='formItem.listType' filterable transfer clearable disabled
                          :options='this.listTypeList' dataValue='code' dataLabel='name' xid='d_listType'></xdo-select>
            </XdoFormItem>
            <XdoFormItem prop='masterCustoms' label='主管海关' xid='c_head_edit_form_item'>
              <xdo-select v-model='formItem.masterCustoms' disabled :asyncOptions='pcodeList'
                         :meta='pcode.customs_rel' :optionLabelRender='pcodeRender' xid='d_masterCustoms'></xdo-select>
            </XdoFormItem>
            <XdoFormItem prop='mergeType' label='归并类型' xid='c_head_edit_form_item'>
              <xdo-select v-model='formItem.mergeType' filterable transfer clearable :disabled='showDisable'
                          :options='this.mergeTypeList' dataValue='code' dataLabel='name'
                          xid='d_mergeType'></xdo-select>
            </XdoFormItem>
            <XdoFormItem prop='note' label='备注' xid='c_head_edit_form_item'>
              <XdoIInput type='text' v-model='formItem.note' :disabled='showDisable' xid='d_note'></XdoIInput>
            </XdoFormItem>
            <XdoFormItem prop='note1' label='本地备注1' xid='c_head_edit_form_item'>
              <XdoIInput type='text' v-model='formItem.note1' :disabled='notesShowDisable' xid='d_note1'></XdoIInput>
            </XdoFormItem>
            <XdoFormItem prop='note2' label='本地备注2' xid='c_head_edit_form_item'>
              <XdoIInput type='text' v-model='formItem.note2' :disabled='notesShowDisable' xid='d_note2'></XdoIInput>
            </XdoFormItem>
            <XdoFormItem prop='note3' label='本地备注3' xid='c_head_edit_form_item'>
              <XdoIInput type='text' v-model='formItem.note3' :disabled='notesShowDisable' xid='d_note3'></XdoIInput>
            </XdoFormItem>
            <XdoFormItem prop='preSeqNo' label='清单预录入统一编号' xid='c_head_edit_form_item'>
              <XdoIInput type='text' v-model='formItem.preSeqNo' disabled xid='d_preSeqNo'></XdoIInput>
            </XdoFormItem>
            <XdoFormItem prop='relEmsNo' label='关联手(账)册编号' xid='c_head_edit_form_item'>
              <XdoIInput type='text' v-model='formItem.relEmsNo' @blur.native.capture="relEmsNomax" :disabled='showDisable' xid='d_relEmsNo'></XdoIInput>
            </XdoFormItem>
            <XdoFormItem prop='relListNo' label='关联核注清单编号' xid='c_head_edit_form_item'>
              <XdoIInput type='text' v-model='formItem.relListNo' :disabled='showDisable' xid='d_relListNo'></XdoIInput>
            </XdoFormItem>
            <XdoFormItem prop='rotateApplyNo' label='申请表编号' xid='c_head_edit_form_item'>
              <XdoIInput type='text' v-model='formItem.rotateApplyNo' :disabled='showDisable'
                         xid='d_rotateApplyNo'></XdoIInput>
            </XdoFormItem>
            <XdoFormItem prop='tradeCountry' label='启运国(地区)/运抵国(地区）' xid='c_head_edit_form_item'>
              <xdo-select v-model='formItem.tradeCountry' :disabled='showDisable' :asyncOptions='pcodeList'
                          :meta='pcode.country_outdated' :optionLabelRender='pcodeRender'
                          xid='d_tradeCountry'></xdo-select>
            </XdoFormItem>
            <XdoFormItem prop='tradeMode' label='监管方式' xid='c_head_edit_form_item'>
              <xdo-select v-model='formItem.tradeMode' @on-change='tradeModeChange' :disabled='showDisable'
                          :asyncOptions='pcodeList' :meta='pcode.trade' :optionLabelRender='pcodeRender'
                          xid='d_tradeMode'></xdo-select>
            </XdoFormItem>
            <XdoFormItem prop='trafMode' label='运输方式' xid='c_head_edit_form_item'>
              <xdo-select v-model='formItem.trafMode' :disabled='showDisable' :asyncOptions='pcodeList'
                          :meta='pcode.transf' :optionLabelRender='pcodeRender' xid='d_trafMode'></xdo-select>
            </XdoFormItem>
          </div>
          <XdoCollapse v-model='value1'>
            <XdoPanel v-show='heid' name='5'>
              隐藏的
<!--             v-show='vSho-->
              <div class='dc-form' slot='content'>
                <XdoFormItem prop='sendUser' label='清单申报人' xid='c_head_edit_form_item'>
                  <XdoIInput type='text' v-model='formItem.sendUser' :disabled='showDisable' xid='d_sendUser'></XdoIInput>
                </XdoFormItem>
                <XdoFormItem prop='status' label='清单状态' xid='c_head_edit_form_item'>
                  <xdo-select v-model='formItem.status' filterable transfer clearable :disabled='showDisable'
                              :options='this.statusList' dataValue="code" dataLabel="name" xid='d_status'></xdo-select>
                </XdoFormItem>
                <XdoFormItem prop='tradeCode' label='经营单位编码' xid='c_head_edit_form_item'>
                  <XdoIInput type='text' v-model='formItem.tradeCode' :disabled='showDisable' xid='d_tradeCode'></XdoIInput>
                </XdoFormItem>
                <XdoFormItem prop='receiveCode' label='加工单位编码' xid='c_head_edit_form_item'>
                  <XdoIInput type='text' v-model='formItem.receiveCode' :disabled='showDisable'
                             xid='d_receiveCode'></XdoIInput>
                </XdoFormItem>
                <XdoFormItem prop='receiveCreditCode' label='加工单位社会信用代码' xid='c_head_edit_form_item'>
                  <XdoIInput type='text' v-model='formItem.receiveCreditCode' :disabled='showDisable'
                             xid='d_receiveCreditCode'></XdoIInput>
                </XdoFormItem>
                <XdoFormItem prop='receiveName' label='加工单位名称' xid='c_head_edit_form_item'>
                  <XdoIInput type='text' v-model='formItem.receiveName' :disabled='showDisable'
                             xid='d_receiveName'></XdoIInput>
                </XdoFormItem>
                <XdoFormItem prop='inputCode' label='录入企业编码' xid='c_head_edit_form_item'>
                  <XdoIInput type='text' v-model='formItem.inputCode' :disabled='showDisable' xid='d_inputCode'></XdoIInput>
                </XdoFormItem>
                <XdoFormItem prop='inputCreditCode' label='录入企业社会信用代码' xid='c_head_edit_form_item'>
                  <XdoIInput type='text' v-model='formItem.inputCreditCode' :disabled='showDisable'
                             xid='d_inputCreditCode'></XdoIInput>
                </XdoFormItem>
                <XdoFormItem prop='inputName' label='录入单位名称' xid='c_head_edit_form_item'>
                  <XdoIInput type='text' v-model='formItem.inputName' :disabled='showDisable' xid='d_inputName'></XdoIInput>
                </XdoFormItem>
                <XdoFormItem prop='vrfdedMark' label='核扣标志' xid='c_head_edit_form_item'>
                  <xdo-select v-model='formItem.vrfdedMark' filterable transfer clearable :disabled='showDisable'
                              :options='this.vrfdedMarkList' xid='d_vrfdedMark'></xdo-select>
                </XdoFormItem>
                <XdoFormItem prop='listIochkptStatus' label='清单进出卡口状态' xid='c_head_edit_form_item'>
                  <XdoIInput type='text' v-model='formItem.listIochkptStatus' :disabled='showDisable'
                             xid='d_listIochkptStatus'></XdoIInput>
                </XdoFormItem>
                <XdoFormItem prop='entryDeclareDate' label='报关单申报日期' xid='c_head_edit_form_item'>
                  <XdoDatePicker type='date' format='yyyy-MM-dd' placeholder=''
                                 :value='formItem.entryDeclareDate ? formItem.entryDeclareDate.slice(0, 10) : formItem.entryDeclareDate'
                                 @on-change="formItem.entryDeclareDate=($event === '' ? $event : ($event + ' 23:59:59'))"
                                 transfer :disabled='showDisable' xid='d_entryDeclareDate'></XdoDatePicker>
                </XdoFormItem>
                <XdoFormItem prop='billListNo' label='清单流水号' xid='c_head_edit_form_item'>
                  <XdoIInput type='text' v-model='formItem.billListNo' :disabled='showDisable'
                             xid='d_billListNo'></XdoIInput>
                </XdoFormItem>
                <XdoFormItem prop='iEMark' label='进出口标记' xid='c_head_edit_form_item'>
                  <XdoIInput type='text' v-model='formItem.iEMark' :disabled='showDisable' xid='d_iEMark'></XdoIInput>
                </XdoFormItem>
                <XdoFormItem prop='seqNo' label='报关单统一编号' xid='c_head_edit_form_item'>
                  <XdoIInput type='text' v-model='formItem.seqNo' :disabled='showDisable' xid='d_seqNo'></XdoIInput>
                </XdoFormItem>
                <XdoFormItem prop='entryStatus' label='报关状态' xid='c_head_edit_form_item'>
                  <xdo-select v-model='formItem.entryStatus' filterable transfer clearable :disabled='showDisable'
                              :options='this.entryStatusList' xid='d_entryStatus'></xdo-select>
                </XdoFormItem>
                <XdoFormItem prop='changeTimes' label='变更次数' xid='c_head_edit_form_item'>
                  <xdo-input v-model.trim='formItem.changeTimes' placeholder='' number int-length='9'
                             :disabled='showDisable' xid='d_changeTimes'></xdo-input>
                </XdoFormItem>
                <XdoFormItem prop='passportUsedMark' label='核放单生成标志代码' xid='c_head_edit_form_item'>
                  <XdoIInput type='text' v-model='formItem.passportUsedMark' :disabled='showDisable'
                             xid='d_passportUsedMark'></XdoIInput>
                </XdoFormItem>
                <XdoFormItem prop='vrfdedMode' label='核扣方式代码' xid='c_head_edit_form_item'>
                  <XdoIInput type='text' v-model='formItem.vrfdedMode' :disabled='showDisable'
                             xid='d_vrfdedMode'></XdoIInput>
                </XdoFormItem>
                <XdoFormItem prop='duCode' label='核算代码' xid='c_head_edit_form_item'>
                  <XdoIInput type='text' v-model='formItem.duCode' :disabled='showDisable' xid='d_duCode'></XdoIInput>
                </XdoFormItem>
                <XdoFormItem prop='indbTime' label='入库时间' xid='c_head_edit_form_item'>
                  <XdoDatePicker type='date' format='yyyy-MM-dd' placeholder=''
                                 :value='formItem.indbTime ? formItem.indbTime.slice(0, 10) : formItem.indbTime'
                                 @on-change="formItem.indbTime=($event === '' ? $event : ($event + ' 23:59:59'))" transfer
                                 :disabled='showDisable' xid='d_indbTime'></XdoDatePicker>
                </XdoFormItem>
                <XdoFormItem prop='icCardNo' label='申报人IC卡号' xid='c_head_edit_form_item'>
                  <XdoIInput type='text' v-model='formItem.icCardNo' :disabled='showDisable' xid='d_icCardNo'></XdoIInput>
                </XdoFormItem>
                <XdoFormItem prop='declareType' label='申报类型' xid='c_head_edit_form_item'>
                  <XdoIInput type='text' v-model='formItem.declareType' :disabled='showDisable'
                             xid='d_declareType'></XdoIInput>
                </XdoFormItem>
                <XdoFormItem prop='preVrfdedDate' label='预核扣时间' xid='c_head_edit_form_item'>
                  <XdoDatePicker type='date' format='yyyy-MM-dd' placeholder=''
                                 :value='formItem.preVrfdedDate ? formItem.preVrfdedDate.slice(0, 10) : formItem.preVrfdedDate'
                                 @on-change="formItem.preVrfdedDate=($event === '' ? $event : ($event + ' 23:59:59'))"
                                 transfer :disabled='showDisable' xid='d_preVrfdedDate'></XdoDatePicker>
                </XdoFormItem>
                <XdoFormItem prop='oriBillListNo' label='原始清单流水号' xid='c_head_edit_form_item'>
                  <XdoIInput type='text' v-model='formItem.oriBillListNo' :disabled='showDisable'
                             xid='d_oriBillListNo'></XdoIInput>
                </XdoFormItem>
                <XdoFormItem prop='formalVrfdedDate' label='正式核扣时间' xid='c_head_edit_form_item'>
                  <XdoDatePicker type='date' format='yyyy-MM-dd' placeholder=''
                                 :value='formItem.formalVrfdedDate ? formItem.formalVrfdedDate.slice(0, 10) : formItem.formalVrfdedDate'
                                 @on-change="formItem.formalVrfdedDate=($event === '' ? $event : ($event + ' 23:59:59'))"
                                 transfer :disabled='showDisable' xid='d_formalVrfdedDate'></XdoDatePicker>
                </XdoFormItem>
                <XdoFormItem prop='rotateType' label='流转类型' xid='c_head_edit_form_item'>
                  <xdo-select v-model='formItem.rotateType' filterable transfer clearable :disabled='showDisable'
                              :options='this.rotateTypeList' dataValue='code' dataLabel='name'
                              xid='d_rotateType'></xdo-select>
                </XdoFormItem>
              </div>
            </XdoPanel>
            <XdoPanel v-show='relationShow' name='1'>
              关联报关
              <div class='dc-form' slot='content'>
                <XdoFormItem prop='relEntryNo' label='关联报关单编号' xid='c_head_edit_form_item'>
                  <XdoIInput type='text' v-model='formItem.relEntryNo' :disabled='showDisable'
                             xid='d_relEntryNo'></XdoIInput>
                </XdoFormItem>
                <XdoFormItem prop='relEntryReceiveCode' label='关联报关单收发货人编码' xid='c_head_edit_form_item'>
                  <XdoIInput type='text' v-model='formItem.relEntryReceiveCode' @keyup.enter.native='getRelEntryReceiveCodeAndName' :disabled='showDisable'
                             xid='d_relEntryReceiveCode'></XdoIInput>
                </XdoFormItem>
                <XdoFormItem prop='relEntryReceiveName' label='关联报关单收发货人名称' xid='c_head_edit_form_item'>
                  <XdoIInput type='text' v-model='formItem.relEntryReceiveName' :disabled='showDisable'
                             xid='d_relEntryReceiveName'></XdoIInput>
                </XdoFormItem>
                <XdoFormItem prop='relEntryReceiveCreditCode' label='关联报关单收发货人社会统一信用代码' xid='c_head_edit_form_item'>
                  <XdoIInput type='text' v-model='formItem.relEntryReceiveCreditCode' :disabled='showDisable'
                             xid='d_relEntryReceiveCreditCode'></XdoIInput>
                </XdoFormItem>
                <XdoFormItem prop='relEntryTradeCode' label='关联报关单消费使用单位编码/关联报关单生产销售单位编码' xid='c_head_edit_form_item'>
                  <XdoIInput type='text' v-model='formItem.relEntryTradeCode' @keyup.enter.native='getRelEntryTradeCodeAndName' :disabled='showDisable'
                             xid='d_relEntryTradeCode'></XdoIInput>
                </XdoFormItem>
                <XdoFormItem prop='relEntryTradeCreditCode' label='关联报关单消费使用单位社会信用代码/关联报关单生产销售单位社会信用代码'
                             xid='c_head_edit_form_item'>
                  <XdoIInput type='text' v-model='formItem.relEntryTradeCreditCode' :disabled='showDisable'
                             xid='d_relEntryTradeCreditCode'></XdoIInput>
                </XdoFormItem>
                <XdoFormItem prop='relEntryTradeName' label='关联报关单消费使用单位名称/关联报关单生产销售单位名称' xid='c_head_edit_form_item'>
                  <XdoIInput type='text' v-model='formItem.relEntryTradeName' :disabled='showDisable'
                             xid='d_relEntryTradeName'></XdoIInput>
                </XdoFormItem>
                <XdoFormItem prop='relEntryDeclareCode' label='关联报关单申报单位编码' xid='c_head_edit_form_item'>
                  <XdoIInput type='text' v-model='formItem.relEntryDeclareCode' @keyup.enter.native='getRelEntryDeclareCodeAndName' :disabled='showDisable'
                             xid='d_relEntryDeclareCode'></XdoIInput>
                </XdoFormItem>
                <XdoFormItem prop='relEntryDeclareName' label='关联报关单申报单位名称' xid='c_head_edit_form_item'>
                  <XdoIInput type='text' v-model='formItem.relEntryDeclareName' :disabled='showDisable'
                             xid='d_relEntryDeclareName'></XdoIInput>
                </XdoFormItem>
                <XdoFormItem prop='relEntryDeclareCreditCode' label='关联报关单申报单位社会统一信用代码' xid='c_head_edit_form_item'>
                  <XdoIInput type='text' v-model='formItem.relEntryDeclareCreditCode' :disabled='showDisable'
                             xid='d_relEntryDeclareCreditCode'></XdoIInput>
                </XdoFormItem>
              </div>
            </XdoPanel>
            <XdoPanel name='2'>
              报关单扩展栏位填报
              <div class='dc-form' slot='content'>
                <XdoFormItem prop='iEDate' label='进出口日期' xid='c_head_edit_form_item'>
                  <XdoDatePicker type='date' format='yyyy-MM-dd' placeholder=''
                                 :value='formItem.iEDate ? formItem.iEDate.slice(0, 10) : formItem.iEDate'
                                 @on-change="formItem.iEDate=($event === '' ? $event : ($event + ' 23:59:59'))" transfer
                                 :disabled='showDisable' xid='d_iEDate'></XdoDatePicker>
                </XdoFormItem>
                <XdoFormItem prop='overseasShipperAeo' label='境外发货人;境外收货人代码' xid='c_head_edit_form_item'>
                  <XdoIInput type='text' v-model='formItem.overseasShipperAeo' :disabled='showDisable'
                             xid='d_overseasShipperAeo'></XdoIInput>
                </XdoFormItem>
                <XdoFormItem prop='overseasShipperName' label='境外发货人/境外收货人' xid='c_head_edit_form_item'>
                  <XdoIInput type='text' v-model='formItem.overseasShipperName' :disabled='showDisable'
                             xid='d_overseasShipperName'></XdoIInput>
                </XdoFormItem>
                <XdoFormItem prop='tradeCodeCiq' label='经营单位编码(商检)' xid='c_head_edit_form_item'>
                  <XdoIInput type='text' v-model='formItem.tradeCodeCiq' :disabled='showDisable'
                             xid='d_tradeCodeCiq'></XdoIInput>
                </XdoFormItem>
                <XdoFormItem prop='agentCodeCiq' label='报关单申报单位代码(商检)' xid='c_head_edit_form_item'>
                  <XdoIInput type='text' v-model='formItem.agentCodeCiq' :disabled='showDisable'
                             xid='d_agentCodeCiq'></XdoIInput>
                </XdoFormItem>
                <XdoFormItem prop='receiveCodeCiq' label='消费使用单位/生产消费单位' xid='c_head_edit_form_item'>
                  <XdoIInput type='text' v-model='formItem.receiveCodeCiq' :disabled='showDisable'
                             xid='d_receiveCodeCiq'></XdoIInput>
                </XdoFormItem>
                <XdoFormItem prop='trafName' label='运输工具名称及航次号' xid='c_head_edit_form_item'>
                  <XdoIInput type='text' v-model='formItem.trafName' :disabled='showDisable'
                             xid='d_trafName'></XdoIInput>
                </XdoFormItem>
                <XdoFormItem prop='voyageNo' label='航次号' xid='c_head_edit_form_item'>
                  <XdoIInput type='text' v-model='formItem.voyageNo' :disabled='showDisable'
                             xid='d_voyageNo'></XdoIInput>
                </XdoFormItem>
                <XdoFormItem prop='warehouse' label='货物存放点' xid='c_head_edit_form_item'>
                  <XdoIInput type='text' v-model='formItem.warehouse' :disabled='showDisable'
                             xid='d_warehouse'></XdoIInput>
                </XdoFormItem>
                <XdoFormItem prop='cutMode' label='征免性质' xid='c_head_edit_form_item'>
                  <xdo-select v-model='formItem.cutMode'  :asyncOptions="pcodeList" :meta="pcode.levytype" :optionLabelRender="pcodeRender" :disabled='showDisable' xid='d_cutMode'></xdo-select>
                </XdoFormItem>
                <XdoFormItem prop='licenseNo' label='许可证号' xid='c_head_edit_form_item'>
                  <XdoIInput type='text' v-model='formItem.licenseNo' :disabled='showDisable'
                             xid='d_licenseNo'></XdoIInput>
                </XdoFormItem>
                <XdoFormItem prop='despPort' label='启运港' xid='c_head_edit_form_item'>
                  <xdo-select v-model='formItem.despPort' :disabled='showDisable' :asyncOptions='pcodeList'
                              :meta='pcode.port_lin' :optionLabelRender='pcodeRender' xid='d_despPort'></xdo-select>
                </XdoFormItem>
                <XdoFormItem prop='tradeNation' label='贸易国（地区）' xid='c_head_edit_form_item'>
                  <xdo-select v-model='formItem.tradeNation' :disabled='showDisable' :asyncOptions='pcodeList'
                              :meta='pcode.country' :optionLabelRender='pcodeRender' xid='d_tradeNation'></xdo-select>
                </XdoFormItem>
                <XdoFormItem prop='destPort' label='经停港/指运港' xid='c_head_edit_form_item'>
                  <xdo-select v-model='formItem.destPort' :disabled='showDisable' :asyncOptions='pcodeList'
                              :meta='pcode.port_lin' :optionLabelRender='pcodeRender' xid='d_destPort'></xdo-select>
                </XdoFormItem>

                <XdoFormItem prop='billNo' label='提运单号' xid='c_head_edit_form_item'>
                  <XdoIInput type='text' v-model='formItem.billNo' :disabled='showDisable' xid='d_billNo'></XdoIInput>
                </XdoFormItem>
                  <XdoFormItem   label='运费币制' xid='c_head_edit_form_item'>
                    <xdo-select v-model='formItem.feeMark' :style="{width:80+'px'}" prop='feeMark' @on-change='feeMarkChange' filterable transfer clearable :disabled='showDisable'
                                :options='this.feeMarkList' dataValue='code' dataLabel='name' xid='d_feeMark'></xdo-select>

                    <xdo-input v-model.trim='formItem.feeRate' :style="{width:80+'px'}" prop='feeRate' placeholder='' decimal :int-length='feeRateIntLength' :precision='feeRatePrecision'
                               :disabled='showDisable' xid='d_feeRate'><i v-show="showIcon" slot='suffix'>%</i></xdo-input>
                    <xdo-select v-model='formItem.feeCurr' prop='feeCurr' :style="{width:120+'px'}" :disabled='showfeeCurr' :asyncOptions='pcodeList'
                                :meta='pcode.curr' :optionLabelRender='pcodeRender' xid='d_feeCurr'></xdo-select>
                  </XdoFormItem>
                <!--                        <div>保费-->
                <XdoFormItem  label='保险费币制' xid='c_head_edit_form_item'>
                  <xdo-select v-model='formItem.insurMark' @on-change='insurMarkChange' prop='insurMark' dataValue='code' dataLabel='name' :style="{width:80+'px'}" filterable transfer clearable :disabled='showDisable'
                              :options='this.insurMarkList' xid='d_insurMark'></xdo-select>
                  <xdo-input v-model.trim='formItem.insurRate' prop='insurRate' :style="{width:80+'px'}" placeholder='' decimal :int-length='insurRateIntLength' :precision='insurRatePrecision'
                             :disabled='showDisable' xid='d_insurRate'><i v-show="showInsurRateIcon" slot='suffix'>%</i></xdo-input>
                  <xdo-select v-model='formItem.insurCurr' prop='insurCurr' :style="{width:120+'px'}" :disabled='showinsurCurr' :asyncOptions='pcodeList'
                              :meta='pcode.curr' :optionLabelRender='pcodeRender' xid='d_insurCurr'></xdo-select>
                </XdoFormItem>
                <!--                      <div>杂费-->
                <XdoFormItem  label='杂费币制' xid='c_head_edit_form_item'>
                  <xdo-select v-model='formItem.otherMark' @on-change='otherMarkChange' prop='otherMark' :style="{width:80+'px'}" dataValue='code' dataLabel='name' filterable transfer clearable :disabled='showDisable'
                              :options='this.insurMarkList' xid='d_otherMark'></xdo-select>
                  <xdo-input v-model.trim='formItem.otherRate' prop='otherRate' :style="{width:80+'px'}" placeholder='' decimal :int-length='otherRateIntLength' :precision='otherRatePrecision'
                             :disabled='showDisable' xid='d_otherRate'><i v-show="showOtherRateIcon" slot='suffix'>%</i></xdo-input>
                  <xdo-select v-model='formItem.otherCurr' prop='otherCurr' :style="{width:120+'px'}" :disabled='showOtherCurr' :asyncOptions='pcodeList'
                              :meta='pcode.curr' :optionLabelRender='pcodeRender' xid='d_otherCurr'></xdo-select>
                </XdoFormItem>

                <XdoFormItem prop='feeRateNote' label='运费备注' xid='c_head_edit_form_item'>
                  <XdoIInput type='text' v-model='formItem.feeRateNote' :disabled='showDisable'
                             xid='d_feeRateNote'></XdoIInput>
                </XdoFormItem>
                <XdoFormItem prop='otherRateNote' label='杂费备注' xid='c_head_edit_form_item'>
                  <XdoIInput type='text' v-model='formItem.otherRateNote' :disabled='showDisable'
                             xid='d_otherRateNote'></XdoIInput>
                </XdoFormItem>
                <XdoFormItem prop='insurRateNote' label='保费备注' xid='c_head_edit_form_item'>
                  <XdoIInput type='text' v-model='formItem.insurRateNote' :disabled='showDisable'
                             xid='d_insurRateNote'></XdoIInput>
                </XdoFormItem>
                <XdoFormItem prop='transMode' label='成交方式' xid='c_head_edit_form_item'>
                  <xdo-select v-model='formItem.transMode' filterable transfer clearable :disabled='showDisable'
                              :options='this.transModeList' dataValue='code' dataLabel='name' xid='d_transMode'></xdo-select>
                </XdoFormItem>
                <XdoFormItem prop='contrNo' label='合同协议号' xid='c_head_edit_form_item'>
                  <XdoIInput type='text' v-model='formItem.contrNo' :disabled='showDisable' xid='d_contrNo'></XdoIInput>
                </XdoFormItem>
                <XdoFormItem prop='packNum' label='件数' xid='c_head_edit_form_item'>
                  <xdo-input v-model.trim='formItem.packNum' placeholder='' number int-length='9'
                             :disabled='showDisable' xid='d_packNum'></xdo-input>
                </XdoFormItem>
                <XdoFormItem prop='grossWt' label='毛重(公斤)' xid='c_head_edit_form_item'>
                  <xdo-input v-model.trim='formItem.grossWt' placeholder='' decimal int-length='14' precision='5'
                             :disabled='showDisable' xid='d_grossWt'></xdo-input>
                </XdoFormItem>
                <XdoFormItem prop='netWt' label='净重(公斤)' xid='c_head_edit_form_item'>
                  <xdo-input v-model.trim='formItem.netWt' placeholder='' decimal int-length='14' precision='5'
                             :disabled='showDisable' xid='d_netWt'></xdo-input>
                </XdoFormItem>
                <XdoFormItem prop='confirmRoyalties' label='支付特许权使用费确认' xid='c_head_edit_form_item'>
                  <xdo-select v-model='formItem.confirmRoyalties' filterable transfer clearable :disabled='showDisable'
                              :options='this.confirmRoyaltiesList' dataValue='code' dataLabel='name' xid='d_confirmRoyalties'></xdo-select>
                </XdoFormItem>
                <XdoFormItem prop='dutySelf' label='自报自缴' xid='c_head_edit_form_item'>
                  <xdo-select v-model='formItem.dutySelf' filterable transfer clearable :disabled='showDisable'
                              :options='this.dutySelfList' dataValue='code' dataLabel='name' xid='d_dutySelf'></xdo-select>
                </XdoFormItem>
                <XdoFormItem prop='confirmSpecial' label='特殊关系确认' xid='c_head_edit_form_item'>
                  <xdo-select v-model='formItem.confirmSpecial' filterable transfer clearable :disabled='showDisable'
                              :options='this.confirmSpecialList' dataValue='code' dataLabel='name' xid='d_confirmSpecial'></xdo-select>
                </XdoFormItem>
                <XdoFormItem prop='confirmPrice' label='价格影响确认' xid='c_head_edit_form_item'>
                  <xdo-select v-model='formItem.confirmPrice' filterable transfer clearable :disabled='showDisable'
                              :options='this.confirmPriceList' dataValue='code' dataLabel='name' xid='d_confirmPrice'></xdo-select>
                </XdoFormItem>
                <XdoFormItem prop='declCustoms' label='申报地海关' xid='c_head_edit_form_item'>
                  <xdo-select v-model='formItem.declCustoms' :disabled='showDisable' :asyncOptions='pcodeList'
                              :meta='pcode.customs_rel' :optionLabelRender='pcodeRender'
                              xid='d_declCustoms'></xdo-select>
                </XdoFormItem>
                <XdoFormItem prop='entryPort' label='入境口岸/离境口岸' xid='c_head_edit_form_item'>
                  <xdo-select v-model='formItem.entryPort' filterable transfer clearable :disabled='showDisable'
                              :asyncOptions='pcodeList' meta='CIQ_ENTY_PORT' :optionLabelRender='pcodeRender'
                              :options='this.entryPortList' xid='d_entryPort'></xdo-select>
                </XdoFormItem>
                <XdoFormItem prop='wrapType' label='包装种类 多个,分割' xid='c_head_edit_form_item'>
                  <xdo-select v-model='formItem.wrapType' multiple :disabled='showDisable' :asyncOptions='pcodeList'
                              meta='WRAP_COMBINATION' :optionLabelRender='pcodeRender' :options='this.wrapTypeList'
                              xid='d_wrapType'></xdo-select>
                </XdoFormItem>
              </div>
            </XdoPanel>
          </XdoCollapse>
        </XdoForm>
      </div>
    </XdoCard>
    <div class='xdo-enter-action dc-edit-actions'>
      <template v-for='item in buttons'>
        <XdoButton v-if='item.needed === true' :type='item.type' :disabled='item.disabled'
                   :loading='item.loading'
                   @click='item.click' :icon='item.icon' :key='item.icon'>{{ item.label }}
        </XdoButton>&nbsp;
      </template>
    </div>
  </section>

</template>
<script>
import { jx_bill_testUri } from '@/api'
import { editStatus } from '@/view/jx_bill_test-common/constant'
import { decimalKeypress, decimalKeyup, numberKeypress, numberKeyup } from '@/libs/num'
import store from '@/store'
export default {
  name: 'DcBillHeadXwtEdit',
  props: {
    editConfig: { type: Object, default: () => ({}) }
  },
  data() {
    return {
      heid:false,
      relationShow:false,
      gMarkShowDisable:false,
      notesShowDisable:false,
      otherRateIntLength:12,
      otherRatePrecision:4,
      insurRateIntLength:12,
      insurRatePrecision:4,
      feeRateIntLength:12,
      feeRatePrecision:4,
      showOtherCurr:false,
      showinsurCurr:false,
      showfeeCurr:false,
      showOtherRateIcon:false,
      showInsurRateIcon:false,
      showIcon:false,
      //控制报关单申报单位编码、报关类型、报关单类型是否禁用
      agentCodeShow: false,
      vShow: false,
      value1: '',
      entryNoShow: true,
      showDisable: false,
      formItem: {
        sid: '',
        tradeCode: '',
        emsNo: '',
        emsListNo: '',
        billListNo: '',
        listNo: '',
        agentCode: '',
        agentCodeCiq: '',
        agentCreditCode: '',
        agentName: '',
        billNo: '',
        changeTimes: '',
        confirmPrice: '',
        confirmRoyalties: '',
        confirmSpecial: '',
        contrNo: '',
        cutMode: '',
        dclcusMark: '',
        dclcusType: '',
        declCustoms: '',
        declareCode: '',
        declareDate: '',
        declareType: '',
        despPort: '',
        destPort: '',
        duCode: '',
        dutySelf: '',
        entryDeclareDate: '',
        entryNo: '',
        entryPort: '',
        entryStatus: '',
        entryType: '',
        feeCurr: '',
        feeMark: '',
        feeRate: '',
        feeRateNote: '',
        formalVrfdedDate: '',
        gMark: '',
        grossWt: '',
        iEDate: '',
        iEMark: '',
        iEPort: '',
        icCardNo: '',
        indbTime: '',
        inputCode: '',
        inputCreditCode: '',
        inputDate: '',
        inputName: '',
        insurCurr: '',
        insurMark: '',
        insurRate: '',
        insurRateNote: '',
        licenseNo: '',
        listIochkptStatus: '',
        listType: '',
        masterCustoms: '',
        mergeType: '',
        netWt: '',
        note: '',
        note1: '',
        note2: '',
        note3: '',
        oriBillListNo: '',
        otherCurr: '',
        otherMark: '',
        otherRate: '',
        otherRateNote: '',
        overseasShipperAeo: '',
        overseasShipperName: '',
        packNum: '',
        passportUsedMark: '',
        preSeqNo: '',
        preVrfdedDate: '',
        receiveCode: '',
        receiveCodeCiq: '',
        receiveCreditCode: '',
        receiveName: '',
        relEmsNo: '',
        relEntryDeclareCode: '',
        relEntryDeclareCreditCode: '',
        relEntryDeclareName: '',
        relEntryNo: '',
        relEntryReceiveCode: '',
        relEntryReceiveCreditCode: '',
        relEntryReceiveName: '',
        relEntryTradeCode: '',
        relEntryTradeCreditCode: '',
        relEntryTradeName: '',
        relListNo: '',
        rotateApplyNo: '',
        rotateType: '',
        sendUser: '',
        seqNo: '',
        status: '',
        tradeCodeCiq: '',
        tradeCountry: '',
        tradeMode: '',
        tradeNation: '',
        trafMode: '',
        trafName: '',
        transMode: '',
        voyageNo: '',
        vrfdedMark: '',
        vrfdedMode: '',
        warehouse: '',
        wrapType: ''
      },
      ruleValidate: {
        tradeCode: [
          { max: 10, message: '长度不能超过10位字节(汉字占2位)！', trigger: 'blur' }
        ],
        emsNo: [
          { max: 12, message: '长度不能超过12位字节(汉字占2位)！', trigger: 'blur' }
        ],
        emsListNo: [
          { required: true, message: '申报类型不能为空！', trigger: 'blur' },
          { max: 64, message: '长度不能超过64位字节(汉字占2位)！', trigger: 'blur' }
        ],
        billListNo: [
          { max: 18, message: '长度不能超过18位字节(汉字占2位)！', trigger: 'blur' }
        ],
        listNo: [
          { max: 18, message: '长度不能超过18位字节(汉字占2位)！', trigger: 'blur' }
        ],
        agentCode: [

          { required: true, message: '报关单申报单位编码不能为空！', trigger: 'blur' },
          { max: 10, message: '长度不能超过10位字节(汉字占2位)！', trigger: 'blur' }
        ],
        agentCodeCiq: [
          { max: 10, message: '长度不能超过10位字节(汉字占2位)！', trigger: 'blur' }
        ],
        agentCreditCode: [
          { max: 18, message: '长度不能超过18位字节(汉字占2位)！', trigger: 'blur' }
        ],
        agentName: [
          { max: 256, message: '长度不能超过256位字节(汉字占2位)！', trigger: 'blur' }
        ],
        billNo: [
          { max: 32, message: '长度不能超过32位字节(汉字占2位)！', trigger: 'blur' }
        ],
        changeTimes: [],
        confirmPrice: [
          { max: 1, message: '长度不能超过1位字节(汉字占2位)！', trigger: 'blur' }
        ],
        confirmRoyalties: [
          { max: 1, message: '长度不能超过1位字节(汉字占2位)！', trigger: 'blur' }
        ],
        confirmSpecial: [
          { max: 1, message: '长度不能超过1位字节(汉字占2位)！', trigger: 'blur' }
        ],
        contrNo: [
          { max: 32, message: '长度不能超过32位字节(汉字占2位)！', trigger: 'blur' }
        ],
        cutMode: [
          { max: 3, message: '长度不能超过3位字节(汉字占2位)！', trigger: 'blur' }
        ],
        dclcusMark: [
          { required: true, message: '报关标志不能为空！', trigger: 'blur' },
          { max: 1, message: '长度不能超过1位字节(汉字占2位)！', trigger: 'blur' }
        ],
        dclcusType: [
          { required: true, message: '报关类型不能为空！', trigger: 'blur' },
          { max: 1, message: '长度不能超过1位字节(汉字占2位)！', trigger: 'blur' }
        ],
        declCustoms: [
          { max: 4, message: '长度不能超过4位字节(汉字占2位)！', trigger: 'blur' }
        ],
        declareCode: [
           { required: true, message: '申报单位不能为空！', trigger: 'blur' },
          { max: 10, message: '长度不能超过10位字节(汉字占2位)！', trigger: 'blur' }
        ],
        declareDate: [
          { max: null, message: '长度不能超过null位字节(汉字占2位)！', trigger: 'blur' }
        ],
        declareType: [
          { max: 1, message: '长度不能超过1位字节(汉字占2位)！', trigger: 'blur' }
        ],
        despPort: [
          { max: 6, message: '长度不能超过6位字节(汉字占2位)！', trigger: 'blur' }
        ],
        destPort: [
          { max: 6, message: '长度不能超过6位字节(汉字占2位)！', trigger: 'blur' }
        ],
        duCode: [
          { max: 4, message: '长度不能超过4位字节(汉字占2位)！', trigger: 'blur' }
        ],
        dutySelf: [
          { max: 1, message: '长度不能超过1位字节(汉字占2位)！', trigger: 'blur' }
        ],
        entryDeclareDate: [
          { max: null, message: '长度不能超过null位字节(汉字占2位)！', trigger: 'blur' }
        ],
        entryNo: [
          { max: 18, message: '长度不能超过18位字节(汉字占2位)！', trigger: 'blur' }
        ],
        entryPort: [
          { max: 6, message: '长度不能超过6位字节(汉字占2位)！', trigger: 'blur' }
        ],
        entryStatus: [
          { max: 2, message: '长度不能超过2位字节(汉字占2位)！', trigger: 'blur' }
        ],
        entryType: [
          { required: true, message: '申报单位不能为空！', trigger: 'blur' },
          { max: 1, message: '长度不能超过1位字节(汉字占2位)！', trigger: 'blur' }
        ],
        feeCurr: [
          { max: 3, message: '长度不能超过3位字节(汉字占2位)！', trigger: 'blur' }
        ],
        feeMark: [
          { max: 1, message: '长度不能超过1位字节(汉字占2位)！', trigger: 'blur' }
        ],
        feeRate: [
        ],
        feeRateNote: [
          { max: 30, message: '长度不能超过30位字节(汉字占2位)！', trigger: 'blur' }
        ],
        formalVrfdedDate: [
          { max: null, message: '长度不能超过null位字节(汉字占2位)！', trigger: 'blur' }
        ],
        gMark: [
          { required: true, message: '料件成品标志不能为空！', trigger: 'blur' },
          { max: 1, message: '长度不能超过1位字节(汉字占2位)！', trigger: 'blur' }
        ],
        grossWt: [],
        iEDate: [
          { max: null, message: '长度不能超过null位字节(汉字占2位)！', trigger: 'blur' }
        ],
        iEMark: [
          { max: 1, message: '长度不能超过1位字节(汉字占2位)！', trigger: 'blur' }
        ],
        iEPort: [
          { required: true, message: '进境关别/出境关别不能为空！', trigger: 'blur' },
          { max: 4, message: '长度不能超过4位字节(汉字占2位)！', trigger: 'blur' }
        ],
        icCardNo: [
          { max: 20, message: '长度不能超过20位字节(汉字占2位)！', trigger: 'blur' }
        ],
        indbTime: [
          { max: null, message: '长度不能超过null位字节(汉字占2位)！', trigger: 'blur' }
        ],
        inputCode: [
          { max: 10, message: '长度不能超过10位字节(汉字占2位)！', trigger: 'blur' }
        ],
        inputCreditCode: [
          { max: 18, message: '长度不能超过18位字节(汉字占2位)！', trigger: 'blur' }
        ],
        inputDate: [
          { required: true, message: '录入日期不能为空！', trigger: 'blur' },
          { max: null, message: '长度不能超过null位字节(汉字占2位)！', trigger: 'blur' }
        ],
        inputName: [
          { max: 50, message: '长度不能超过50位字节(汉字占2位)！', trigger: 'blur' }
        ],
        insurCurr: [
          { max: 3, message: '长度不能超过3位字节(汉字占2位)！', trigger: 'blur' }
        ],
        insurMark: [
          { max: 1, message: '长度不能超过1位字节(汉字占2位)！', trigger: 'blur' }
        ],
        insurRate: [],
        insurRateNote: [
          { max: 30, message: '长度不能超过30位字节(汉字占2位)！', trigger: 'blur' }
        ],
        licenseNo: [
          { max: 20, message: '长度不能超过20位字节(汉字占2位)！', trigger: 'blur' }
        ],
        listIochkptStatus: [
          { max: 1, message: '长度不能超过1位字节(汉字占2位)！', trigger: 'blur' }
        ],
        listType: [
          { required: true, message: '清单类型不能为空！', trigger: 'blur' },
          { max: 1, message: '长度不能超过1位字节(汉字占2位)！', trigger: 'blur' }
        ],
        masterCustoms: [
          { required: true, message: '主管海关不能为空！', trigger: 'blur' },
          { max: 4, message: '长度不能超过4位字节(汉字占2位)！', trigger: 'blur' }
        ],
        mergeType: [
          { required: true, message: '归并类型不能为空！', trigger: 'blur' },
          { max: 1, message: '长度不能超过1位字节(汉字占2位)！', trigger: 'blur' }
        ],
        netWt: [],
        note: [
          { max: 256, message: '长度不能超过256位字节(汉字占2位)！', trigger: 'blur' }
        ],
        note1: [
          { max: 255, message: '长度不能超过255位字节(汉字占2位)！', trigger: 'blur' }
        ],
        note2: [
          { max: 255, message: '长度不能超过255位字节(汉字占2位)！', trigger: 'blur' }
        ],
        note3: [
          { max: 255, message: '长度不能超过255位字节(汉字占2位)！', trigger: 'blur' }
        ],
        oriBillListNo: [
          { max: 20, message: '长度不能超过20位字节(汉字占2位)！', trigger: 'blur' }
        ],
        otherCurr: [
          { max: 3, message: '长度不能超过3位字节(汉字占2位)！', trigger: 'blur' }
        ],
        otherMark: [
          { max: 1, message: '长度不能超过1位字节(汉字占2位)！', trigger: 'blur' }
        ],
        otherRate: [],
        otherRateNote: [
          { max: 30, message: '长度不能超过30位字节(汉字占2位)！', trigger: 'blur' }
        ],
        overseasShipperAeo: [
          { max: 50, message: '长度不能超过50位字节(汉字占2位)！', trigger: 'blur' }
        ],
        overseasShipperName: [
          { max: 256, message: '长度不能超过256位字节(汉字占2位)！', trigger: 'blur' }
        ],
        packNum: [],
        passportUsedMark: [
          { max: 1, message: '长度不能超过1位字节(汉字占2位)！', trigger: 'blur' }
        ],
        preSeqNo: [
          { max: 18, message: '长度不能超过18位字节(汉字占2位)！', trigger: 'blur' }
        ],
        preVrfdedDate: [
          { max: null, message: '长度不能超过null位字节(汉字占2位)！', trigger: 'blur' }
        ],
        receiveCode: [
          { max: 10, message: '长度不能超过10位字节(汉字占2位)！', trigger: 'blur' }
        ],
        receiveCodeCiq: [
          { max: 10, message: '长度不能超过10位字节(汉字占2位)！', trigger: 'blur' }
        ],
        receiveCreditCode: [
          { max: 18, message: '长度不能超过18位字节(汉字占2位)！', trigger: 'blur' }
        ],
        receiveName: [
          { max: 50, message: '长度不能超过50位字节(汉字占2位)！', trigger: 'blur' }
        ],
        relEmsNo: [
          { max: 12, message: '长度不能超过12位字节(汉字占2位)！', trigger: 'blur' }
        ],
        relEntryDeclareCode: [
          { max: 10, message: '长度不能超过10位字节(汉字占2位)！', trigger: 'blur' }
        ],
        relEntryDeclareCreditCode: [
          { max: 18, message: '长度不能超过18位字节(汉字占2位)！', trigger: 'blur' }
        ],
        relEntryDeclareName: [
          { max: 50, message: '长度不能超过50位字节(汉字占2位)！', trigger: 'blur' }
        ],
        relEntryNo: [
          { max: 18, message: '长度不能超过18位字节(汉字占2位)！', trigger: 'blur' }
        ],
        relEntryReceiveCode: [
          { max: 10, message: '长度不能超过10位字节(汉字占2位)！', trigger: 'blur' }
        ],
        relEntryReceiveCreditCode: [
          { max: 18, message: '长度不能超过18位字节(汉字占2位)！', trigger: 'blur' }
        ],
        relEntryReceiveName: [
          { max: 50, message: '长度不能超过50位字节(汉字占2位)！', trigger: 'blur' }
        ],
        relEntryTradeCode: [
          { max: 10, message: '长度不能超过10位字节(汉字占2位)！', trigger: 'blur' }
        ],
        relEntryTradeCreditCode: [
          { max: 18, message: '长度不能超过18位字节(汉字占2位)！', trigger: 'blur' }
        ],
        relEntryTradeName: [
          { max: 50, message: '长度不能超过50位字节(汉字占2位)！', trigger: 'blur' }
        ],
        relListNo: [
          { max: 18, message: '长度不能超过18位字节(汉字占2位)！', trigger: 'blur' }
        ],
        rotateApplyNo: [
          { max: 64, message: '长度不能超过64位字节(汉字占2位)！', trigger: 'blur' }
        ],
        rotateType: [
          { max: 1, message: '长度不能超过1位字节(汉字占2位)！', trigger: 'blur' }
        ],
        sendUser: [
          { max: 128, message: '长度不能超过128位字节(汉字占2位)！', trigger: 'blur' }
        ],
        seqNo: [
          { max: 18, message: '长度不能超过18位字节(汉字占2位)！', trigger: 'blur' }
        ],
        status: [
          { max: 2, message: '长度不能超过2位字节(汉字占2位)！', trigger: 'blur' }
        ],
        tradeCodeCiq: [
          { max: 10, message: '长度不能超过10位字节(汉字占2位)！', trigger: 'blur' }
        ],
        tradeCountry: [
          { required: true, message: '启运国(地区)/运抵国不能为空！', trigger: 'blur' },
          { max: 3, message: '长度不能超过3位字节(汉字占2位)！', trigger: 'blur' }
        ],
        tradeMode: [
           { required: true, message: '监管方式不能为空！', trigger: 'blur' },
          { max: 4, message: '长度不能超过4位字节(汉字占2位)！', trigger: 'blur' }
        ],
        tradeNation: [
          { max: 3, message: '长度不能超过3位字节(汉字占2位)！', trigger: 'blur' }
        ],
        trafMode: [
           { required: true, message: '运输方式不能为空！', trigger: 'blur' },
          { max: 1, message: '长度不能超过1位字节(汉字占2位)！', trigger: 'blur' }
        ],
        trafName: [
          { max: 50, message: '长度不能超过50位字节(汉字占2位)！', trigger: 'blur' }
        ],
        transMode: [
          { max: 1, message: '长度不能超过1位字节(汉字占2位)！', trigger: 'blur' }
        ],
        voyageNo: [
          { max: 32, message: '长度不能超过32位字节(汉字占2位)！', trigger: 'blur' }
        ],
        vrfdedMark: [
          { max: 1, message: '长度不能超过1位字节(汉字占2位)！', trigger: 'blur' }
        ],
        vrfdedMode: [
          { max: 2, message: '长度不能超过2位字节(汉字占2位)！', trigger: 'blur' }
        ],
        warehouse: [
          { max: 100, message: '长度不能超过100位字节(汉字占2位)！', trigger: 'blur' }
        ],
        wrapType: [
           { max: 64, message: '长度不能超过64位字节(汉字占2位)！', trigger: 'blur' }
        ]
      },
      buttons: [
        {
          testName:'',
          code: 'Save',
          type: 'primary',
          disabled: false,
          click: this.handleSave,
          label: '保存',
          loading: false,
          needed: true
        },
        {
          code: 'Cancel',
          type: 'primary',
          disabled: false,
          click: this.handleBack,
          label: '返回',
          loading: false,
          needed: true
        }
      ],
      sid: '',
      rotateTypeList: [],
      agentCodeList: [],
      agentCodeCiqList: [],
      confirmPriceList: [],
      confirmRoyaltiesList: [],
      confirmSpecialList: [],
      dclcusMarkList: [],
      dclcusTypeList: [],
      dutySelfList: [],
      entryStatusList: [],
      entryTypeList: [],
      feeMarkList: [],
      gMarkList: [],
      iEPortList: [],
      insurMarkList: [],
      otherMarkList:[],
      listTypeList: [],
      mergeTypeList: [],
      statusList: [],
      vrfdedMarkList: [],
      wrapTypeList:[],
      transModeList:[]
    }
  },
  mounted: function() {

    this.transModeList=this.editConfig.transModeList;
    this.otherMarkList=this.editConfig.otherMarkList;
    this.insurMarkList=this.editConfig.insurMarkList;
    this.feeMarkList=this.editConfig.feeMarkList;
    this.dutySelfList=this.editConfig.dutySelfList;
    this.confirmSpecialList=this.editConfig.confirmSpecialList;
    this.confirmRoyaltiesList=this.editConfig.confirmRoyaltiesList;
   this.confirmPriceList=this.editConfig.confirmPriceList;
    //渲染隐藏栏位:清单状态 下拉框的值
    this.$http.post(jx_bill_testUri.xwManageHeadUrl.dcBillHeadXwt.getStatus).then(res => {
      if (res.data.success) {
        this.statusList=res.data.data;
      }
    }, () => {});
    this.$http.post(jx_bill_testUri.xwManageHeadUrl.dcBillHeadXwt.getRotateType).then(res => {
      if (res.data.success) {
        this.rotateTypeList = res.data.data
      }
    }, () => {})
    this.$http.post(jx_bill_testUri.xwManageHeadUrl.dcBillHeadXwt.getMergeType).then(res => {
      if (res.data.success) {
        this.mergeTypeList = res.data.data
      }
    }, () => {})
    this.$http.post(jx_bill_testUri.xwManageHeadUrl.dcBillHeadXwt.getEntryType).then(res => {
      if (res.data.success) {
        store.state.entryType=res.data.data
        this.entryTypeList = res.data.data
      }
    }, () => {})
    this.$http.post(jx_bill_testUri.xwManageHeadUrl.dcBillHeadXwt.getDclcusType).then(res => {
      if (res.data.success) {
        this.dclcusTypeList = res.data.data
      }
    }, () => {})
    this.$http.post(jx_bill_testUri.xwManageHeadUrl.dcBillHeadXwt.getDclcusMark).then(res => {
      if (res.data.success) {
        store.state.dclcusMarkList=res.data.data
        this.dclcusMarkList = res.data.data
      }
    }, () => {})
    this.$http.post(jx_bill_testUri.xwManageHeadUrl.dcBillHeadXwt.getGMark).then(res => {
      if (res.data.success) {
        this.gMarkList = res.data.data
      }
    }, () => {})
    this.getListType()

    if (this.editConfig && this.editConfig.editStatus === editStatus.ADD) {
      this.resetFormData()
      this.showDisable = false
      this.buttons.filter(item => item.code === 'Save')[0].needed = true
      //默认手(账)册编号为“E230319A0005”
      this.formItem.emsNo = 'E230319A0005';
      //清单类型:默认为0-普通清单
      this.formItem.listType = '0';
      //料件成品标志,进口核注清单默认料件
      this.formItem.gMark = 'I';
      //录入日期 默认为当前时间
      this.formItem.inputDate = new Date().format('yyyy-MM-dd hh:mm:ss');
      //报关标志默认为报关
      this.formItem.dclcusMark = '1';
      //默认取所选择手册的手/账册编号第2-5位
      this.formItem.masterCustoms = this.formItem.emsNo.substring(1, 5);
      //(19)	报关单类型默认1-进口报关单
      this.formItem.entryType = '1';
      //设置隐藏栏位:清单状态的默认值
      this.formItem.status='A0';
      this.dclcusMergeType();
      //默认当前手(账)册号的经营单位,加工单位,录入单位的编码,名称和社会信用代码的信息
      this.$http.post(jx_bill_testUri.xwManageHeadUrl.dcBillHeadXwt.getCodeNameCreditCodeByEmsNo,{emsNo:this.formItem.emsNo}).then(res => {
        if (res.data.success) {
          this.formItem.tradeCode=res.data.data.tradeCode
          this.formItem.receiveCode=res.data.data.receiveCode
          this.formItem.receiveName=res.data.data.receiveName
          this.formItem.receiveCreditCode=res.data.data.receiveCreditCode
        }
      }, () => {});
      return
    } else if (this.editConfig && this.editConfig.editStatus === editStatus.EDIT) {
      this.formItem = { ...this.editConfig.editData }
      //回显"包装种类" ,转成数组类型
      if (this.formItem.wrapType!=''&&this.formItem.wrapType!=null){
        this.formItem.wrapType=this.formItem.wrapType.split(",")
      }
      this.showDisable = false
      this.sid = this.editConfig.editData.sid
      this.buttons.filter(item => item.code === 'Save')[0].needed = true
      this.formItem.dclcusType=this.editConfig.editData.dclcusType
      //清单表体有数据时不修改料件成品标志
      this.$http.post(jx_bill_testUri.xwManageHeadUrl.dcBillHeadXwt.getListCount,{sid:this.sid}).then(res => {
        if (res.data.success) {
          this.gMarkShowDisable=true;
        }
      }, () => {});
      this.formItem.masterCustoms = this.formItem.emsNo.substring(1, 5);
      return
    } else if (this.editConfig && this.editConfig.editStatus === editStatus.SHOW) {
      this.notesShowDisable=true
      this.formItem = { ...this.editConfig.editData }
      //回显"包装种类" ,转成数组类型
      if (this.formItem.wrapType!=''&&this.formItem.wrapType!=null){
        this.formItem.wrapType=this.formItem.wrapType.split(",")
      }
      this.showDisable = true
      this.buttons.filter(item => item.code === 'Save')[0].needed = false
      this.formItem.masterCustoms = this.formItem.emsNo.substring(1, 5);
      return
    } else if (this.editConfig && this.editConfig.editStatus === editStatus.DELAPPLY){
      this.formItem = { ...this.editConfig.editData }
      this.showDisable = true
      this.buttons.filter(item => item.code === 'Save')[0].testName='DELAPPLY'
      this.buttons.filter(item => item.code === 'Save')[0].needed = true
      this.buttons.filter(item => item.code === 'Save')[0].label = '申请'
      return;
    }
  },
  methods: {
    //杂费
    otherMarkChange:function(){
      //SUZHOUCHITA-946-BS
      // this.formItem.otherCurr='';
      // this.formItem.otherRate='';
      if (this.formItem.otherMark=='1'){
        this.showOtherCurr=true;
        this.formItem.otherCurr='';
        this.showOtherRateIcon=true;
        this.otherRateIntLength=2;
        this.otherRatePrecision=4;
      }else{
        this.showOtherRateIcon=false;
        this.showOtherCurr=false;
        this.otherRateIntLength=12;
        this.otherRatePrecision=4;
      }
    },
    //保费	若“类型”未选择，保存时清空“费率”、“币制”栏位值
    insurMarkChange:function(){
      // this.formItem.insurCurr='';
      // this.formItem.insurRate='';
      //若“类型”选择“1 率”，保存时清空“币制”栏位，“费率”栏位按 非空 数字（2.4）
      if (this.formItem.insurMark=='1'){
        this.showinsurCurr=true;
        this.formItem.insurCurr='';
        this.showInsurRateIcon=true;
        this.insurRateIntLength=2;
        this.insurRatePrecision=4;
      }else{
        //若“类型”选择 2、3，保存时，“费率”栏位按 非空 数字（12.4）校验、”币制”按非空校验
        this.showInsurRateIcon=false;
        this.showinsurCurr=false;
        this.insurRateIntLength=12;
        this.insurRatePrecision=4;
      }
    },
    //运费
    feeMarkChange:function(){
      // this.formItem.feeCurr='';
      // this.formItem.feeRate='';
      if (this.formItem.feeMark=='1'){
          this.showfeeCurr=true;
          this.formItem.feeCurr='';
          this.showIcon=true;
          this.feeRateIntLength=2;
          this.feeRatePrecision=4;
      }else{
        this.showIcon=false;
        this.showfeeCurr=false;
        this.feeRateIntLength=12;
        this.feeRatePrecision=4;
      }
    },

    relEmsNomax:function(){
      if (this.formItem.relEmsNo.length!=12){
        this.$Message.info('关联手(账)册编号长度必须12位！');
      }
    },
    //账册编号为E开头时，默认0-自动归并，可修改；账册编号非E开头的，默认为空
    dclcusMergeType() {
      const str = this.formItem.emsNo.substring(0, 1)
      if (str=='E'){
        this.formItem.mergeType='0';
      }else {
        this.formItem.mergeType='';
      }
    },
    //(7)	监管方式-TRADE_MODE
    tradeModeChange: function() {
      //取账册第一位
      const str  = this.formItem.emsNo.substring(0, 1)
      const tradeModelListA= ['0845', '4400', '0865', '0214', '0245', '0300', '0265', '0255', '0258']
      const tradeModelListB= ['0864', '0844', '4600', '0615', '0715', '0664', '0644', '0700', '0654', '0657']
      //根据监管方式自动生成流转类型
      if (this.formItem.tradeMode == '0654' || this.formItem.tradeMode == '0255') {
        this.formItem.rotateType = 'A';
      } else if (this.formItem.tradeMode == '0657' || this.formItem.tradeMode == '0258') {
        this.formItem.rotateType = 'B';
      } else if (this.formItem.tradeMode == '0456') {
        this.formItem.rotateType = 'C';
      } else if (this.formItem.tradeMode == '5100') {
        this.formItem.gMark = 'E';
      } else if (this.formItem.tradeMode == '5034') {
        this.formItem.gMark = 'E';
      } else {
        this.formItem.rotateType = '';
      }
      //若“手(账)册编号”的第1位是“C”监管方式不能填写tradeModelListA里的数据
      for (let i = 0; i < tradeModelListA.length; i++) {
        if (str == 'C' && this.formItem.tradeMode == tradeModelListA[i]) {
          this.$Message.info('来料手册不能填报进料监管方式!');
          this.formItem.tradeMode = '';
        }
      }
      //若“手(账)册编号”的第1位是“B”监管方式不能填写tradeModelListB里的数据
      for (let i = 0; i < tradeModelListB.length; i++) {
        if (str == 'B' && this.formItem.tradeMode == tradeModelListB[i]) {
          this.$Message.info('来来料手册不能填报进料监管方式!!');
          this.formItem.tradeMode = '';
        }
      }
    },
    //报关类型从关联报关改为对应报关时，关联报关相关展开栏位清空
    dclcusTypeChange(){
      if (this.formItem.dclcusType=='2'){
        this.formItem.relEntryNo='';
        this.formItem.relEntryReceiveCode='';
        this.formItem.relEntryReceiveCreditCode='';
        this.formItem.relEntryReceiveName='';
        this.formItem.relEntryTradeCode='';
        this.formItem.relEntryTradeCreditCode='';
        this.formItem.relEntryDeclareCode='';
        this.formItem.relEntryDeclareCreditCode='';
        this.formItem.relEntryDeclareName='';
        // this.formItem.agentCodeCiq='';
        this.formItem.relEntryTradeName='';
        this.relationShow=false;
        this.value1='';
      }
      if (this.formItem.dclcusType=='1') {
        this.relationShow=true;
        this.value1='1';

      }
    },
    //判断报关标志的状态
    dclcusMarkChange: function() {
      if (this.formItem.dclcusMark == '2') {
        this.formItem.agentCode = ''
        this.ruleValidate.agentCode[0].required = false
        this.formItem.dclcusType = ''
        this.ruleValidate.dclcusType[0].required = false
        this.formItem.entryType = ''
        this.ruleValidate.entryType[0].required = false
        this.agentCodeShow = true
        this.formItem.mergeType = '0'
      } else {
        //18题 当报关标志为“1-报关”时，报关类型默认2-对应报关
        this.formItem.dclcusType = '2'
        //当报关标志为“1-报关”时 报关单类型 报关类型 报关申报企业编码 开启非空
        this.ruleValidate.agentCode[0].required = true
        this.ruleValidate.dclcusType[0].required = true
        this.ruleValidate.entryType[0].required = true
        this.agentCodeShow = false

      }
      if((this.editConfig.editStatus === editStatus.EDIT) || (this.editConfig.editStatus === editStatus.SHOW)){
        this.formItem.dclcusType=this.editConfig.editData.dclcusType;
      }
      if ((this.formItem.dclcusMark == '2'&&this.editConfig.editStatus === editStatus.EDIT) || (this.formItem.dclcusMark == '2'&&this.editConfig.editStatus === editStatus.SHOW)){
        this.formItem.dclcusType='';
      }
      if (this.editConfig.editStatus === editStatus.SHOW){
        this.agentCodeShow = true;
        this.gMarkShowDisable=true;
        this.showOtherCurr=true;
        this.showinsurCurr=true;
        this.showfeeCurr=true;
      }
    },
    //(12)	当“报关单类型”选择X的时候,报关单编号-ENTRY_NO栏位可用,否则不可用
    judgeEntryNo: function() {
      if (this.formItem.entryType != 'X') {
        this.entryNoShow = true
      } else {
        this.entryNoShow = false;
      }
      // this.entryNoShow = this.formItem.entryType !== 'X';

    },
    //第十题
    judgeStatus: function() {
      const str = this.formItem.iEPort.substring(this.formItem.iEPort.length - 2, this.formItem.iEPort.length)
      console.log(str)
      if (str == '00') {
        this.$Message.info('进境关别不应填写直属海关，请确认是否继续填报!');
      }
    },
    getAgentNameAndCode: function() {//13题 14 15
      this.$http.get('/api/pcode?type=COMPANY&code='+this.formItem.agentCode).then(res => {
        this.formItem.agentName=res.data.data[0].NAME
        this.formItem.agentCreditCode=res.data.data[0].SOCIAL_CREDIT_CODE
      }, () => {
      });
    },
    //根据输入的关联报关单收发货人编码 带出 名称和信用代码
    getRelEntryReceiveCodeAndName: function() {
      this.$http.get('/api/pcode?type=COMPANY&code='+this.formItem.relEntryReceiveCode).then(res => {
        this.formItem.relEntryReceiveName=res.data.data[0].NAME
        this.formItem.relEntryReceiveCreditCode=res.data.data[0].SOCIAL_CREDIT_CODE
      }, () => {
      });
    },
    //根据输入的关联报关单消费使用/生产销售单位编码 带出 名称和信用代码
    getRelEntryTradeCodeAndName: function() {
      this.$http.get('/api/pcode?type=COMPANY&code='+this.formItem.relEntryTradeCode).then(res => {
        this.formItem.relEntryTradeName=res.data.data[0].NAME
        this.formItem.relEntryTradeCreditCode=res.data.data[0].SOCIAL_CREDIT_CODE
      }, () => {
      });
    },
    //根据关联报关单申报单位编码带出 名称和信用代码
    getRelEntryDeclareCodeAndName: function() {
      this.$http.get('/api/pcode?type=COMPANY&code='+this.formItem.relEntryDeclareCode).then(res => {
        this.formItem.relEntryDeclareName=res.data.data[0].NAME
        this.formItem.relEntryDeclareCreditCode=res.data.data[0].SOCIAL_CREDIT_CODE
      }, () => {
      });
    },
    getListType() {
      this.$http.post(jx_bill_testUri.xwManageHeadUrl.dcBillHeadXwt.getListType).then(res => {
        if (res.data.success) {
          this.listTypeList = res.data.data
        }
      }, () => {
      })
    },
    resetFormData() {
      this.$refs['formItem'].resetFields()
    },
    //删改申请:修改表头状态和清单信息
    updataHeadList(){
      this.$http.post(jx_bill_testUri.xwManageHeadUrl.dcBillHeadXwt.updList,{sid:this.formItem.sid}).then(res => {
        if (res.data.success) {
          alert("已更改")
        }
      }, () => {
      });
    },
    handleSave() {
      //删改申请
      if (this.buttons[0].testName=='DELAPPLY'){
        console.log(this.editConfig.editData)
        this.$http.post(jx_bill_testUri.xwManageHeadUrl.dcBillHeadXwt.getHeadHis,{billListNo:this.editConfig.editData.billListNo,sid:this.formItem.sid}).then(res => {
          if (res.data.success) {
            this.updataHeadList();
            this.handleBack();
            alert("已申请")
          }
        }, () => {
        });
        return;
      }
      //包装种类- WRAP_TYPE：可空，下拉框（可多选）入库时使用半角逗号’,’分割
      if (this.formItem.wrapType=='' || this.formItem.wrapType==null){
          this.formItem.wrapType=null
      }else {
          this.formItem.wrapType=this.formItem.wrapType.toString()
      }
      this.$refs['formItem'].validate().then(isValid => {
        //检验当前状态下编辑是否能用
        if ((this.formItem.status=='B1' || this.formItem.status=='C1' || this.formItem.status=='0' ||
            this.formItem.status=='1' || this.formItem.status=='2' || this.formItem.status=='DL' ||
          this.formItem.status=='4' || this.formItem.status=='5' || this.formItem.status=='Y') && this.editConfig.editStatus === editStatus.EDIT){
            alert("当前状态编辑不可用!")
          return;
        }
        if (((this.formItem.status=='D1' && this.formItem.declareType!='1')||
            (this.formItem.status=='3'&&this.formItem.declareType!='1')||
            (this.formItem.status=='Z'&&this.formItem.declareType!='1')) && this.editConfig.editStatus === editStatus.EDIT){
          alert("当前状态编辑不可用!")
          return;
        }
        //运费，保费，杂费的验证
        if (this.formItem.feeMark==''){
          this.formItem.feeCurr=''
          this.formItem.feeRate=''
        }else if (this.formItem.feeMark=='1' && (this.formItem.feeRate==null || this.formItem.feeRate=='')){
          this.formItem.feeCurr=''
          alert("费率不能为空")
          return;
        }else if ((this.formItem.feeMark=='3' || this.formItem.feeMark=='2') && (this.formItem.feeRate==null || this.formItem.feeRate=='')){
          alert("费率不能为空")
          return;
        }else if ((this.formItem.feeMark=='3' || this.formItem.feeMark=='2') && (this.formItem.feeCurr==null || this.formItem.feeCurr=='')){
          alert("运费币制不能为空")
          return;
        }else if (this.formItem.insurMark==''){
          this.formItem.insurCurr=''
          this.formItem.insurRate=''
        }else if (this.formItem.insurMark=='1' && (this.formItem.insurRate==null || this.formItem.insurRate=='')){
          this.formItem.insurCurr=''
          alert("保费不能为空")
          return;
        }else if ((this.formItem.insurMark=='3' || this.formItem.insurMark=='2') && (this.formItem.insurRate==null || this.formItem.insurRate=='')){
          alert("保费不能为空")
          return;
        }else if ((this.formItem.insurMark=='3' || this.formItem.insurMark=='2') && (this.formItem.insurCurr==null || this.formItem.insurCurr=='')){
          alert("保费币制不能为空")
          return;
        }else if (this.formItem.otherMark==''){
          this.formItem.otherCurr=''
          this.formItem.otherRate=''
        }else if (this.formItem.otherMark=='1' && (this.formItem.otherRate==null || this.formItem.otherRate=='')){
          this.formItem.otherCurr=''
          alert("杂费不能为空")
          return;
        }else if ((this.formItem.otherMark=='3' || this.formItem.otherMark=='2') && (this.formItem.otherRate==null || this.formItem.otherRate=='')){
          alert("杂费费不能为空")
          return;
        }else if ((this.formItem.otherMark=='3' || this.formItem.otherMark=='2') && (this.formItem.otherCurr==null || this.formItem.otherCurr=='')){
          alert("杂费币制不能为空")
          return;
        }
        //	若监管方式-trade_mode为0654、0255时，表头运输方式只能为9，否则提示
        if ((this.formItem.tradeMode=='0654' || this.formItem.tradeMode=='0255')&&this.formItem.trafMode!='9'){
            alert("监管方式是进料深加工或者来料深加工时，运输方式只能选择其他方式运输!")
            return;
        }
        if (isValid) {
          let http = ''
          this.buttons.filter(item => item.code === 'Save')[0].loading = true
          if (this.sid) {
            http = this.$http.put(`${jx_bill_testUri.xwManageHeadUrl.dcBillHeadXwt.update}/${this.sid}`, this.formItem, { noIntercept: true })
          } else {
            http = this.$http.post(jx_bill_testUri.xwManageHeadUrl.dcBillHeadXwt.insert, this.formItem, { noIntercept: true })
          }
          http.then(res => {
            if (res.data.success) {
              this.$Message.success(res.data.message)
              //跳回首页
              //this.handleBack()
            } else {
              this.$Message.error(res.data.message)
            }
          }, () => {
          }).finally(() => {
            this.buttons.filter(item => item.code === 'Save')[0].loading = false
          })
        }
      })
    },
    handleBack() {
      this.$emit('onEditBack', true)
    },
    decimalKeypress, decimalKeyup, numberKeypress, numberKeyup
  }
}
</script>
<style lang='less' scoped>
</style>
